package cool.houge.pig;

/**
 * 无异常堆栈的的业务码异常.
 *
 * @author KK (kzou227@qq.com)
 */
public class StacklessBizCodeException extends BizCodeException {

  /** @param bizError */
  public StacklessBizCodeException(BizError bizError) {
    super(bizError);
  }

  /**
   * @param bizError
   * @param message
   */
  public StacklessBizCodeException(BizError bizError, String message) {
    super(bizError, message);
  }

  /**
   * @param bizError
   * @param cause
   */
  public StacklessBizCodeException(BizError bizError, Throwable cause) {
    super(bizError, cause);
  }

  /**
   * @param bizError
   * @param message
   * @param cause
   */
  public StacklessBizCodeException(BizError bizError, String message, Throwable cause) {
    super(bizError, message, cause);
  }

  @Override
  public synchronized Throwable fillInStackTrace() {
    // 重写 fillInStackTrace()，这样我们就不会通过本机调用填充回溯，从而泄漏类加载器。
    return this;
  }
}
